import 'package:tender_flutter/generated/json/base/json_convert_content.dart';
import 'package:tender_flutter/generated/json/base/json_field.dart';

class UserInfoEntity with JsonConvert<UserInfoEntity> {
  String token;
  String area;
  @JSONField(name: "area_id")
  String areaId;
  String phone;
  int level;
  int num;
  String sex;
  String nickname;
  int id;
  String picture;
  String email;
  String username;
  String company;
  String txBeginMoney;
  String inMoney;
  double money;
  String code;
  String expireDate;
  String inviteCode;
  int msgUnreadNum;
  @JSONField(name: "JKTimes")
  String jkTime;
  @JSONField(name: "TYTimes")
  String tyTime;
  bool vipValid;
  bool isInvited;

  bool isVip() {
    return (level ?? 0) > 0 && vipValid ? true : false;
  }
}
